<!doctype html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
img {
    background-color:red;
    border-radius: 50px;
}
</style>
<img id="roundedImg" src="none" width="100px" height="100px" />
<div id="log"></div>
<script>
test(function(t)
{
    var element = document.getElementById("roundedImg");
    var x = element.offsetLeft + element.offsetWidth - 2;
    var y = element.offsetTop + element.offsetHeight - 2;

    var element = document.elementFromPoint(x, y);
    assert_equals(element.nodeName, 'BODY');
}, "elementFromPoint should return an element under a point that is clipped to a border-radius");
</script>
